<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>任务审核</title>
</head>
<body>
    <div th:fragment="main" id="check" class="check">
        <link rel="stylesheet" th:href="@{/assets/viewer/viewer.css}">
        <link rel="stylesheet" th:href="@{/assets/jquery.eeyellow.Timeline/jquery.eeyellow.Timeline.css}">
        <link rel="stylesheet" th:href="@{/css/assignmentGroup/check.css}">
        <div class="pending_content">
            <!-- 导航栏 -->
            <div class="title clearfix">
                <ol class="breadcrumb title-content pull-left">
                    <li><a href="#qualitycontrol-assignmentGroup-pending">任务管理</a></li>
                    <li>任务审核</li>
                </ol>
                <a class="btn btn-primary goback" href="#qualitycontrol-assignmentGroup-pending">
                    <span>«</span>
                    返回
                </a>
            </div>
            <!-- 内容 -->
            <div class="contents">
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active">
                        <a href="#basic" aria-controls="basic" role="tab" data-toggle="tab">基本信息</a>
                    </li>
                    <li role="presentation">
                        <a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">流程信息</a>
                    </li>
                </ul>
                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane active" id="basic">
                        <div id="basicInformation" class="basic-information">
                            <!-- 基本信息 -->
                        </div>
                        <!-- 示例图片 -->
                        <div class="ibox">
                            <div class="ibox-title example" id="showImage">
                                <span></span>
                                <h5>示例图片</h5>
                                <div class="ibox-tools">
                                    <a class="collapse-link">
                                        <i class="fa fa-chevron-down" id="fa"></i>
                                    </a>
                                </div>
                            </div>
                            <div class="sample-pictures" id="samplePictures">
                                <div class="carousel slide" id="carousel3">
                                    <div class="pictures" id="pictures">
                                        <ul id="samplePictureList" class="clearfix"> 
                                            <!-- 示例图片 -->
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- 审核图片 -->
                        <div class="ibox">
                            <div class="ibox-title examine">
                                <span></span>
                                <h5>审核图片</h5>
                            </div>
                            <div class="pending-pictures" id="pendingPictures">
                                <div class="carousel slide" id="carousel3">
                                    <div class="review-images" id="reviewImages">
                                        <ul id="reviewImagesList" class="clearfix"> 
                                            <!-- 审核图片 -->
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div role="tabpanel" class="tab-pane" id="profile">
                        <div class="task-process">
                            <div class="taskprocess-info" id="taskProcessInfo">
                                <div class="VivaTimeline" id="VivaTimeline">
                                    <!-- 流程信息 -->
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 按钮区 -->
            <div class="buttons">
                <input class="btn btn-primary pull-right reject" type="button" value="驳回"    data-toggle="modal" data-target="#myModal">
                <input class="btn btn-primary pull-right pass" id="pass" type="button" value="通过">
            </div>
        </div>
        <!-- 驳回模态框 -->
        <!-- Modal -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">请填写驳回理由：</h4>
                    </div>
                    <div class="modal-body">
                        <textarea class="form-control" rows="10" id="rejectReason" placeholder="内容不超过250字" maxlength="250"></textarea>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary" id="reject">驳&nbsp;回</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">取&nbsp;消</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- 基本业务数据模板 -->
        <script type="text/template" id="checkBasicInformationTpl">
            <table>
                {{if processRule != null}}
                <tbody>
                    <tr>
                        <td>
                            <p class="heading"><span>设备编号</span>&nbsp;: </p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.deviceId}}" readonly>
                        </td>
                        <td colspan="2">
                            <p class="heading"><span>设备类型</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{deviceTypeName}}" readonly>
                        </td>
                        <td colspan="3">
                            <p class="heading"><span>设备位置</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{deviceAddrs}}" readonly>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="heading"><span>经纬度</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.longitude}} / {{subTaskBusinessData.latitude}}" readonly>
                        </td>
                        {{if processRule.additionalBusinessId == 4}}
                        <td>
                            <p class="heading"><span>获取方式</span>&nbsp;:</p> 
                            {{if subTaskBusinessData.acquisitionMode}}
                            <input name="" class="" type="text" value="蓝牙" readonly>
                            {{else}}
                            <input name="" class="" type="text" value="WIFI" readonly>
                            {{/if}}
                        </td>
                        <td>
                            <span class="heading">RSRP&nbsp;:</span> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.rsrp}}" readonly>
                        </td>
                        <td>
                            <span class="heading">CELLID&nbsp;:</span> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.cellid}}" readonly>
                        </td>
                        <td>
                            <span class="heading">SINR&nbsp;:</span> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.sinr}}" readonly>
                        </td>
                        {{else if processRule.additionalBusinessId == 5}}
                        <td>
                            <p class="heading"><span>获取方式</span>&nbsp;:</p> 
                            {{if subTaskBusinessData.acquisitionMode}}
                            <input name="" class="" type="text" value="蓝牙" readonly>
                            {{else}}
                            <input name="" class="" type="text" value="WIFI" readonly>
                            {{/if}}
                        </td>
                        <td>
                            <span class="heading">RSRP&nbsp;:</span> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.rsrp}}" readonly>
                        </td>
                        <td>
                            <span class="heading">CELLID&nbsp;:</span> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.cellid}}" readonly>
                        </td>
                        <td>
                            <span class="heading">SINR&nbsp;:</span> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.sinr}}" readonly>
                        </td>
                        {{/if}}
                    </tr>
                    <tr>
                        {{if processRule.additionalBusinessId == 1}}
                        <td>
                            <p class="heading"><span>具备安装</span>&nbsp;:</p> 
                            {{if subTaskBusinessData.install}}
                            <input name="" class="" type="text" value="是" readonly>
                            {{else}}
                            <input name="" class="" type="text" value="否" readonly>
                            {{/if}}
                        </td>
                        <td colspan="3">
                            <p class="heading"><span>原因</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.isInstallDesc}}" readonly>
                        </td>
                        {{else if processRule.additionalBusinessId == 4}}
                        <td>
                            <p class="heading"><span>具备安装</span>&nbsp;:</p> 
                            {{if subTaskBusinessData.install}}
                            <input name="" class="" type="text" value="是" readonly>
                            {{else}}
                            <input name="" class="" type="text" value="否" readonly>
                            {{/if}}
                        </td>
                        <td colspan="3">
                            <p class="heading"><span>原因</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.isInstallDesc}}" readonly>
                        </td>
                        {{else if processRule.additionalBusinessId == 7}}
                        <td>
                            <p class="heading"><span>具备安装</span>&nbsp;:</p> 
                            {{if subTaskBusinessData.install}}
                            <input name="" class="" type="text" value="是" readonly>
                            {{else}}
                            <input name="" class="" type="text" value="否" readonly>
                            {{/if}}
                        </td>
                        <td colspan="3">
                            <p class="heading"><span>原因</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.isInstallDesc}}" readonly>
                        </td>
                        {{/if}}
                    </tr>
                    <tr>
                        {{if processRule.additionalBusinessId == 3}}
                        <td colspan="2">
                            <p class="heading"><span>故障原因</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.faultReason}}" readonly>
                        </td>
                        <td colspan="2">
                            <p class="heading"><span>故障描述</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.faultDesc}}" readonly>
                        </td>
                        <td>
                            <p class="heading"><span>是否恢复</span>&nbsp;:</p> 
                            {{if subTaskBusinessData.recove}}
                            <input name="" class="" type="text" value="是" readonly>
                            {{else}}
                            <input name="" class="" type="text" value="否" readonly>
                            {{/if}}
                        </td>
                        {{else if processRule.additionalBusinessId == 6}}
                        <td colspan="2">
                            <p class="heading"><span>故障原因</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.faultReason}}" readonly>
                        </td>
                        <td colspan="2">
                            <p class="heading"><span>故障描述</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.faultDesc}}" readonly>
                        </td>
                        <td>
                            <p class="heading"><span>是否恢复</span>&nbsp;:</p> 
                            {{if subTaskBusinessData.recove}}
                            <input name="" class="" type="text" value="是" readonly>
                            {{else}}
                            <input name="" class="" type="text" value="否" readonly>
                            {{/if}}
                        </td>
                        {{else if processRule.additionalBusinessId == 9}}
                        <td colspan="2">
                            <p class="heading"><span>故障原因</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.faultReason}}" readonly>
                        </td>
                        <td colspan="2">
                            <p class="heading"><span>故障描述</span>&nbsp;:</p> 
                            <input name="" class="" type="text" value="{{subTaskBusinessData.faultDesc}}" readonly>
                        </td>
                        <td>
                            <p class="heading"><span>是否恢复</span>&nbsp;:</p> 
                            {{if subTaskBusinessData.recove}}
                            <input name="" class="" type="text" value="是" readonly>
                            {{else}}
                            <input name="" class="" type="text" value="否" readonly>
                            {{/if}}
                        </td>
                        {{/if}}
                    </tr>
                    <tr>
                        <td colspan="9">
                            <p class="heading"><span>备注</span>&nbsp;:</p>
                            {{if subTaskProcessInfoList.length>1}}
                            <div class="remarks">{{subTaskProcessInfoList[1].description}}</div>
                            {{else}}
                            <div class="remarks">{{subTaskProcessInfoList[0].description}}</div>
                            {{/if}}
                        </td>
                    </tr>      
                </tbody>
                {{else}}
                <tbody>
                    <tr>
                        <td>流程规则异常</td>
                    </tr>
                </tbody>
                {{/if}}
            </table>
        </script>
        <!-- 任务流程信息模板 -->
        <script type="text/template" id="taskProcessInfoTpl">
            <dl>
                {{each subTaskProcessInfoList}}
                    {{if $value.processName == '施工'}}
                    <!-- <dt>Feb 2016</dt> -->
                    <dd class="pos-left clearfix">
                        <div class="circ"></div>
                        <!-- <div class="time">{{$value.updateTime}}</div> -->
                        <div class="events">
                            <div class="events-header">
                                <div class="events-headerName">
                                    <p>任务名称：{{subTaskName}}，{{$value.processName}}</p>
                                    <p>{{$value.updateTime}}</p>
                                </div>
                            </div>
                            <div class="events-body">
                                <div class="row">
                                    <div class="events-desc">
                                        <div class="txt">
                                            <span>任务状态</span>：
                                            <!--{{if $value.processState == 0}}-->
                                                <!--施工中-->
                                            <!--{{else if $value.processState == 1}}-->
                                                <!--审核中-->
                                            <!--{{else if $value.processState == 2}}-->
                                                <!--施工完成-->
                                            <!--{{else if $value.processState == 3}}-->
                                                <!--审核通过-->
                                            <!--{{else if $value.processState == 4}}-->
                                                <!--审核驳回-->
                                            <!--{{/if}}-->
                                            {{if $value.processState == 0}}
                                            未处理
                                            {{else if $value.processState == 1}}
                                            处理完成
                                            {{else if $value.processState == 2}}
                                            未审核
                                            {{else if $value.processState == 3}}
                                            审核驳回
                                            {{else if $value.processState == 4}}
                                            待整改
                                            {{else if $value.processState == 5}}
                                            整改完成
                                            {{else if $value.processState == 6}}
                                            审核通过
                                            {{else if $value.processState == 7}}
                                            已完成
                                            {{/if}}
                                        </div>
                                        <div class="txt">
                                            <span>{{$value.processName}}人
                                            {{if $value.uiInputName == ''}}    
                                            </span>：&nbsp;{{$value.operatorName}}
                                            {{else}}
                                            </span>：&nbsp;{{$value.uiInputName}}
                                            {{/if}}
                                        </div>
                                        <div class="txt"><span>备注</span>：&nbsp;{{$value.description}}</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </dd>
                    {{else if $value.processName == '审核'}}
                    <dd class="pos-right clearfix">
                        <div class="circ"></div>
                        <!-- <div class="time">{{$value.updateTime}}</div> -->
                        <div class="events">
                            <div class="events-header">
                                <div class="events-headerName">
                                    <p>任务名称：{{subTaskName}}，{{$value.processName}}</p>
                                    <p>{{$value.updateTime}}</p>
                                </div>
                            </div>
                            <div class="events-body">
                                <div class="row">
                                    <div class="events-desc">
                                        <div class="txt">
                                            <span>任务状态</span>：
                                            <!--{{if $value.processState == 0}}-->
                                                <!--施工中-->
                                            <!--{{else if $value.processState == 1}}-->
                                                <!--审核中-->
                                            <!--{{else if $value.processState == 2}}-->
                                                <!--施工完成-->
                                            <!--{{else if $value.processState == 3}}-->
                                                <!--审核通过-->
                                            <!--{{else if $value.processState == 4}}-->
                                                <!--审核驳回-->
                                            <!--{{/if}}-->
                                            {{if $value.processState == 0}}
                                            未处理
                                            {{else if $value.processState == 1}}
                                            处理完成
                                            {{else if $value.processState == 2}}
                                            未审核
                                            {{else if $value.processState == 3}}
                                            审核驳回
                                            {{else if $value.processState == 4}}
                                            待整改
                                            {{else if $value.processState == 5}}
                                            整改完成
                                            {{else if $value.processState == 6}}
                                            审核通过
                                            {{else if $value.processState == 7}}
                                            已完成
                                            {{/if}}
                                        </div>
                                        <div class="txt">
                                            <span>{{$value.processName}}人</span>：&nbsp;{{$value.operatorName}}
                                        </div>
                                        <div class="txt"><span>备注</span>：&nbsp;{{$value.description}}</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </dd>
                    {{/if}}
                {{/each}}
            </dl>
        </script>
        <script th:src="@{/assets/viewer/viewer.js}"></script>
        <script th:src="@{/assets/jquery.eeyellow.Timeline/jquery.eeyellow.Timeline.js}"></script>
        <script th:src="@{/js/assignmentGrop/check.js}"></script>
        <script>
            
        </script>
    </div>
</body>
</html>